From ee176cd19db46a225c39877bc37f9f3e12309077 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jul 2006 11:08:02 +0000 Subject: [PATCH] (delphi-fill-comment): Use save-restriction. --- lisp/progmodes/delphi.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 03ab24adf47..44a192ab772 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -1767,6 +1767,7 @@ it is a routine." An error is raised if not in a comment." (interactive) (save-excursion + (save-restriction (let* ((comment (delphi-current-token)) (comment-kind (delphi-token-kind comment))) (if (not (delphi-is comment-kind delphi-comments)) @@ -1845,7 +1846,7 @@ An error is raised if not in a comment." ;; React to the entire fill change as a whole. (delphi-progress-start) (delphi-parse-region comment-start comment-end) - (delphi-progress-done)))))) + (delphi-progress-done))))))) (defun delphi-new-comment-line () "If in a // comment, does a newline, indented such that one is still in the -- 2.30.2